from matplotlib import pyplot as plt
import numpy as np

data = np.loadtxt('time.csv', dtype = np.float64)
print(data)

x = data[:, 0]
y = data[:, 1]
t1 = data[:, 2]
t2 = data[:, 3]

figure = plt.figure()

plt.subplot(1, 2, 1)
plt.xlabel('number of dofs',fontsize = 14)
plt.ylabel('solve time(ms)',fontsize = 14)
plt.plot(x * y, t1,'-bx') 
plt.subplot(1, 2, 2)
plt.xlabel('number of dofs',fontsize = 14)
plt.ylabel('total time(ms)',fontsize = 14)
plt.plot(x * y, t2,'-bx')
plt.show()


